import request from '@/utils/request'

// 目录列表

export function tagsList(params) {
    return request({
        url: '/tags',
        method: 'get',
        params

    })
}

// 获取用户详情
export const XtagsApi = (id) => {
    return request({
        method: 'get',
        url: '/tags/' + id,
    })
}

// 添加
export const addtagsApi = (data) => {
    return request({
        method: 'post',
        url: '/tags',
        data
    })
}
// 修改
export const edittagsApi = (data) => {
    return request({
        method: 'PUT',
        url: '/tags/' + data.id,
        data
    })
}

// 删除
export const deltagsApi = (id) => {
    return request({
        method: 'DELETE',
        url: '/tags/' + id,

    })
}


// 状态
export const stateTagsApi = (data) => {
    return request({
        method: 'POST',
        url: '/tags/' + data.id + '/' + data.state,
        data
    })
}
